/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bda.mediatheque.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author samsung
 */
@Entity
@Table(name = "gout")
@NamedQueries({
    @NamedQuery(name = "Gout.findAll", query = "SELECT g FROM Gout g")})
public class Gout implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    @Basic(optional = false)
    @NotNull
    @Column(name = "goutId")
    private Integer goutId;
    @Size(max = 45)
    @Column(name = "titreGout")
    private String titreGout;

    public Gout() {
    }

    public Gout(Integer goutId) {
        this.goutId = goutId;
    }

    public Integer getGoutId() {
        return goutId;
    }

    public void setGoutId(Integer goutId) {
        this.goutId = goutId;
    }

    public String getTitreGout() {
        return titreGout;
    }

    public void setTitreGout(String titreGout) {
        this.titreGout = titreGout;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (goutId != null ? goutId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Gout)) {
            return false;
        }
        Gout other = (Gout) object;
        if ((this.goutId == null && other.goutId != null) || (this.goutId != null && !this.goutId.equals(other.goutId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bda.mediatheque.dao.Gout[ goutId=" + goutId + " ]";
    }
    
}
